// 导入封装的请求实例
import request from '@/utils/request'
// 请求方法
export const getSysUserListApi = params => {
  return request({
    url: '/admin/sys_user/list',
    method: 'get',
    params
  })
}
// 查询单个
export const getSysUserInfoApi = params => {
  // params 提交的是 { id:142}
  return request({
    url: '/admin/sys_user/rowInfo',
    method: 'get',
    params
  })
}

// 添加
export const addSysUserInfoApi = data => {
  return request({
    url: '/admin/sys_user/add',
    method: 'post',
    data
  })
}
// 修改

export const updateSysUserInfoApi = data => {
  return request({
    url: '/admin/sys_user/update',
    method: 'post',
    data
  })
}
// 删除

export const delSysUserInfoApi = params => {
  return request({
    url: '/admin/sys_user/del',
    method: 'get',
    params
  })
}
// 获取角色
export const getroleInfoApi = () => {
  return request({
    url: '/admin/sys_role/list',
    method: 'get'
  })
}
